<?php use_helper("Number"); ?>

<h2><?php echo __("league"); ?>: <?php echo $league; ?></h2>

<div>
  <?php echo link_to(__("players"), '@stats_league');?> ::
  <?php echo link_to(__("boardgames"), '@stats_boardgames');?> :: 
  <?php echo link_to(__("all league matches"), '@matches_all');?>
</div>

<table border="1">
  <tr>
    <th>Player</th>
    <th>Pts.</th>
    <th>Match</th>
    <th>Win</th>
    <th>&nbsp;</th>
  </tr>
  <?php foreach($players as $player): ?>
    <tr>
      <td>
        <?php echo link_to($player->getUsername(), '@stats_player?username=' . $player->getUsername()); ?>
      </td>
      <td>
        <?php echo $player->getTotalPoints(); ?>
      </td>
      <td>
        <?php echo $player->getNMatch(); ?>
      </td>
      <td>
        <?php echo $player->getNWin(); ?>
      </td>
      <td>
        <?php echo link_to(__("all matches"), '@matches_player?username=' . $player->getUsername()); ?>
      </td>
    </tr>
  <?php endforeach; ?>
</table>

<div><?php echo link_to(__("indietro"), '@stats_start')?></div>
